﻿using System;
using System.Collections.Generic;
using System.Web.Mvc;
using FluentValidation.Results;

namespace QAS.Nekorama.Models
{
    /// <summary>
    /// 詳細質問モデル
    /// </summary>
    public class QuestionDetailModel
    {
        /// <summary>
        /// 回答リスト
        /// </summary>
        public List<Answer> Answers { get; set; }

        /// <summary>
        /// コンメントリスト
        /// </summary>
        public List<Comment> Comments { get; set; }

        /// <summary>
        /// 質問
        /// </summary>
        public Question Question { get; set; }

        /// <summary>
        /// 報奨
        /// </summary>
        public Bounty Bounty { get; set; }

        /// <summary>
        /// 失敗リスト
        /// </summary>
        public ICollection<ValidationFailure> Failures { get; set; }
    }

    /// <summary>
    /// 評価モデル
    /// </summary>
    public class VoteModel
    {
        /// <summary>
        /// 評価者
        /// </summary>
        public int Voter { get; set; }

        /// <summary>
        /// アップ評価かどうか
        /// </summary>
        public bool IsPositive { get; set; }

        /// <summary>
        /// 評価される投稿のID
        /// </summary>
        public int TargetID { get; set; }

        /// <summary>
        /// 質問であるかどうか
        /// </summary>
        public bool IsQuestion { get; set; }
    }

    /// <summary>
    /// 報告モデル
    /// </summary>
    public class ReportModel
    {
        /// <summary>
        /// 報告者
        /// </summary>
        public int ReporterID { get; set; }

        /// <summary>
        /// 報告される投稿のID
        /// </summary>
        public int TargetID { get; set; }
    }

    /// <summary>
    /// 回答編集モデル
    /// </summary>
    public class EditAnswerModel
    {
        /// <summary>
        /// 編集される回答のID
        /// </summary>
        public int AnswerID { get; set; }

        /// <summary>
        /// 編集者のID
        /// </summary>
        public int ModifiedUser { get; set; }
        
        /// <summary>
        /// 編集の理由
        /// </summary>
        public String EditReason { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        [AllowHtml]
        public String Content { get; set; }
    }
}